use rocket::serde::{Deserialize, Serialize};


crud!(Goods{});
impl_select!(Goods{get_all_goods_info()=>""});


#[derive(Serialize, Deserialize, Clone, Debug)]
pub struct Price {
    #[serde(rename = "type")]
    pub price_type: String,
    pub value: String,
}


#[derive(Serialize, Deserialize, Clone, Debug)]
pub struct Goods {
    pub id: Option<i32>,
    pub category_id: Option<i32>,
    pub name: Option<String>,
    pub picture: Option<String>,
    pub description: Option<String>,
    pub content: Option<String>,
    pub price: Option<Price>,
}


